class_name PhysicalClickComp
extends HComponent

@export_group("物理点击组件")
@export var click_enable:bool = true
@export_subgroup("悬停事件")
@export var hint_str:String = ""
@export_subgroup("点击事件")
@export var item_list:Array[HItemContainer]
@export var attach_node_free:bool = false


func hover_func():
	if not click_enable:
		return

func click_func():
	if not click_enable:
		return
	for item_container in item_list:
		DataManager.bag_data.append_item(item_container)
	if attach_node_free:
		self.attach_node.queue_free()
		
